fix: clearer migration and config errors; document codec API#148
Merged
Conversation
Error-clarity round 2 from the prod-ready audit: - #10 — a rejected migration statement now reports the migration file, the failed statement position ("statement N of M"), and a SQL preview on top of the cleaned ClickHouse message. statementError() wraps both the sync DDL and async paths; the journal still records the raw CH error. - #21 — a syntax error in clickhouse.config.ts now prints the actual build diagnostics (collectAggregateErrorMessages expands the AggregateError.errors) instead of only the "N errors building config.ts" summary. - #22 — documented the column `codec` API (general/preprocessor/raw codecs, chains, render output, and the codec_chain_* validation rules) in the schema DSL reference. Unit + live e2e tests against the .env.test cluster; all green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
c9b80b7 to
9d9d550
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Error-clarity round 2 from the prod-ready audit (the batch deliberately left out of NUM-7316–7319).
statementError()wraps both the sync DDL and async paths; the journal still records the raw CH error.clickhouse.config.tsnow prints the actual build diagnostics (collectAggregateErrorMessagesexpandsAggregateError.errors) instead of only the"N errors building config.ts"summary.codecAPI in the schema DSL reference: general/preprocessor/raw codecs, chains, render output, and thecodec_chain_*validation rules. Docs-only.Test plan
previewStatement/statementError(Refactor CLI batch and schema normalization flows #10),collectAggregateErrorMessages(chore: version packages 0.1.0-beta.1 #21)..env.testcluster: a migration whose 2nd statement is rejected surfaces "statement 2 of 2" + the file + SQL preview + the CH message (Refactor CLI batch and schema normalization flows #10).clickhouse.config.tsprints the underlyingExpected …diagnostics, not just the summary (chore: version packages 0.1.0-beta.1 #21).turbo build typecheck lint+ docs build green.patchchangeset (chkit).🤖 Generated with Claude Code